package com.sky.disruptor.handler;

import com.alibaba.fastjson.JSONObject;
import com.lmax.disruptor.EventHandler;
import com.sky.disruptor.entity.OrderEntity;

public class OrderHandler implements EventHandler<OrderEntity> {

    @Override
    public void onEvent(OrderEntity orderEntity, long l, boolean b) throws Exception {
        //System.out.println(Thread.currentThread().getName() + "========消费者处理OrderHandler========" + JSONObject.toJSONString(orderEntity))
        System.out.println(orderEntity.getOrderId());
    }
}
